/*
 * @Description: excel 导出
 * @Author: Rfan
 * @Date: 2022-06-22 09:51:33
 * @LastEditTime: 2023-03-04 14:25:47
 */
import { useState } from 'react';
import ExportSipDialog from '../../../dialogs/ExportSip';
import type { IBaseProp } from '../../../../index';
import { EnumReceiveTypes, receiveTypeName } from '@/dictionary/transfer';

interface CDExportProps {
  info: IBaseProp;
  selectItems: number[];
}

const SipExport = (props: CDExportProps) => {
  const { info, selectItems } = props;
  const [visible, setVisible] = useState(false);

  return (
    <>
      <div
        onClick={() => {
          setVisible(true);
        }}
      >
        {receiveTypeName(EnumReceiveTypes.SIP)}
      </div>
      <ExportSipDialog
        visible={visible}
        info={info}
        selectItems={selectItems}
        onClose={() => {
          setVisible(false);
        }}
      />
    </>
  );
};

export default SipExport;
